UDP Message driver

Communicating with a device via the UDP message driver uses the UDP/IP protocol and Windows sockets. The integrator end point may be set as a server (listening socket) or a client (connecting socket).

The recognised configuration properties are listed below:

 

Name Type Default Value Description
Server Boolean False Flag to indicate whether this is a server or client
IPAddress IP address/Host name Unique ID that must match the DeviceID of the message headers going or coming from to this PLC
ClientPort Port Number 15000 Indicates the port number to connect to. Optional in Server mode. See examples
ListenPort Port Number 16000 Indicates the port number Sym3 listens on. Optional in client mode. See examples
MsgID Message ID 0 Sym3 message number used for Server mode without the Sym3 Header (StripHeader=true)
StripHeader Boolean False When messages are sent and received the Sym3 Header is not sent as part of the message on the network. This allows devices that do not use the Sym3 Header to communicate with Sym3
ReconnectTime Unsigned Integer 5000 ms Time between client reconnection attempts (seconds). Valid for client only
NetworkByteOrder Boolean False Identifies the endian order of the message header numeric values. The device IO contents are treated as single bytes therefore not swapped.
Autoconnect Boolean True (optional true if not specified). If false, Sym3 won't connect to this device until an explicit call to ConnectDevice() is made from the script.
BufferSize Number 1024 Optional. Number of bytes for the buffer used for communication. Default 1024 bytes
ContinuouslySendingOutput Boolean False Optional. Output messages are sent only if an output data has been changed. If you want Sym3 to continuously send messages you can set the flag to 'True'. Warning: this may affect performance significantly. Sym3 does not recommend using this setting. The update rate used will be the UpdateRate set for output data. The only way to change this is to export DeviceIOs to CSV file and change the last column then re-import the CSV file. Default rate is set to 50ms.
 

 

Examples

Server examples

1 - Sym3 listening on specific port with one or more devices sending Datagrams. Sym3 receives UDP Datagram and assigns message number 100 for Sym3 Device IO / Scripts to process. Sym3 Headers are not sent on the network.

 

Configuration:

server = true
listenport = 16000
stripheader = true
msgid = 100
 

 

2 - Sym3 listening on specific port with one or more devices sending Datagrams. Sym3 sends messages to each of the clients. Messages may be sent to specific client or to all clients by sending using the Sym3 Server Device (MyServer).

The clients must have the ListenPort set to the MyServer listen port. Client ports may be different from each other.

 

Configuration:

MyServer:
server = true
listenport = 16000

 

Device1:
server = false
ipaddress = 192.168.1.1
clientport = 17000
listenport = 16000

 

Device2:
server = false
ipaddress = 192.168.1.2
clientport = 17001
listenport = 16000

 

Device3:
server = false
ipaddress = 192.168.1.3
clientport = 17000
listenport = 16000
 

 

3 - Sym3 listening on specific port and sending Datagrams to a device / server listening on specific port.

 

Configuration:

server = true
ipaddress = 192.168.1.1
listenport = 16000
clientport = 16000

 

Client example

Sym3 connecting to device on specific port and using random assigned port from host operating system. Device replies to peer (Sym3) port.

 

Configuration:

server = false
ipaddress = 192.168.1.1
clientport = 16000
reconnecttime = 10
networkbyteorder = false
 

NOTE: Configuration data is not case sensitive and white space is ignored.